package core

type AppType int32

const (
	AppTypeAlgo    AppType = 1
	AppTypeService AppType = 2
)

func (a AppType) String() string {
	switch a {
	case AppTypeAlgo:
		return "algo app"
	case AppTypeService:
		return "service app"
	default:
		return "UNKNOWN"
	}
}

type CodeType int32

const (
	CodeTypeGetNodeTypeSparkJava CodeType = 1 // 给 datas 的 java 组件用的
	CodeTypeSparkJavaNew         CodeType = 7
	CodeTypeSparkPython          CodeType = 2
	CodeTypeOdpsPython           CodeType = 3
	CodeTypeOdpsMr               CodeType = 4
	CodeTypePython               CodeType = 5
	CodeTypeJava                 CodeType = 6
	CodeTypeNotebook             CodeType = 11
	CodeTypeRuntime              CodeType = 12
	CodeTypeSupRuntime           CodeType = 13
	CodeTypeDatafile             CodeType = 21
	CodeTypeSendfile             CodeType = 31
	CodeTypeDashboard            CodeType = 22
	CodeTypeDashboardPage        CodeType = 23
	CodeTypeShareRuntimePython   CodeType = 101
	CodeTypeShareRuntimeDotNet   CodeType = 102
	CodeTypeRpaCommon            CodeType = 501
	CodeTypeRpaExcel             CodeType = 502
	CodeTypeRpaBrowser           CodeType = 503
	CodeTypeRpaFlowControl       CodeType = 504
	CodeTypeRpaSystem            CodeType = 505
	CodeTypeRpaFile              CodeType = 506
	CodeTypeCompositeApp         CodeType = 998
	CodeTypeComposite            CodeType = 999
	CodeTypeUpstream             CodeType = 1001
	CodeTypeDownstream           CodeType = 1002
	CodeTypeModel                CodeType = 10001
	CodeTypeWebInput             CodeType = 10002
	CodeTypeWebOutput            CodeType = 10003
	CodeTypeHardware             CodeType = 50
	CodeTypeHardwareNetwork      CodeType = 51
	CodeTypeVoidNode             CodeType = 55
)

type NodeType string

const (
	NodeTypeCommon          = "common"
	NodeTypeHardware        = "hardware"
	NodeTypeHardwareNetwork = "hardware-network"
	NodeTypeShareRuntime    = "runtime"
)
